#include <bits/stdc++.h>
using namespace std;
int n, m, q, u, v, t;
int a[10010];
int main()
{
    priority_queue<int> pq;
    cin >> n >> m >> q >> u >> v >> t;
    for(int i = 1; i <= n; i++){
        cin >> a[i];
        pq.push(a[i]);
    }
    double p = u / v;
    for(int i = 1; i <= m; i++){
        int x = pq.top();
        int k = floor(p * x);
        pq.pop();
        for(int i = 1; i <= n - 1; i++)
        {
            a[i] = pq.top();
            pq.pop();
        }
        for(int i = 1; i <= n - 1; i++)
            pq.push(a[i] + q);
        pq.push(k);
        pq.push(x - k);
        if(i % t == 0)
            cout << x << " ";
    }
    puts("");
    for(int i = 1; i <= n + m; i++)
    {
        int x = pq.top();
        pq.pop();
        if(i % t == 0)
            cout << x << " ";
    }
    return 0;
}